<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>双向绑定</title>
</head>
<body>
    <div id="app">
        <input type="button" value="get请求" class="get">
        <input type="button" value="get请求" class="post" >
    </div>

    <!-- 官网提供的 axios 在线地址 -->
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>

    <script>
        document.querySelector(".get").onclick=function(){
            //本地项目：E:\aMyPro\testapi
            axios.get("http://localhost:8080/joke").then((result) => {
                console.log(result)
                alert(result.data.info+"..")
            }).catch((err) => {
                console.log(err)
            });
        }
    </script>
</body>
</html>